package com.zc.commons.http.enums;

/**
 * @author zhangchunjia
 * @description 响应码
 * @date 2021/12/31
 **/
public enum RespCode {
    OK(200, "成功"), ERROR(300, "自定义错误"),
    UNAUTHORIZED(401, "未认证或者认证失败"), FORBIDDEN(403, "禁止访问"),
    INTERNAL_ERROR(500, "内部错误");

    RespCode(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * 编码
     */
    private Integer code;

    /**
     * 名称
     */
    private String name;

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
